{% extends 'layout.html' %}
<!--
继承+重写
-->
{%block main%}

<div class="blog-container">
    <div class="">用户管理页面</div>
    <div>当前用户：{{userinfo.username}}（{{userinfo._id}}）</div>
    <h3>分类列表</h3>
    <div>

        <table>
            <tr>
                <th>ID</th>
                <th>分类名</th>
                <th>操作</th>
            </tr>

            {% for item in category %}
            <tr>
                <td>{{item._id.toString()}}</td>
                <td>{{item.name.toString()}}</td>
                <td>
                    <a href="/admin/category/edit?id={{item._id.toString()}}">修改</a>
                    <a href="/admin/category/delete?id={{item._id.toString()}}">删除</a>
                </td>
            </tr>
            {% endfor %}
        </table>

    </div>
</div>
{%endblock%}
